package com.example.day23;

/**
 * @author Lenovo
 */
public class FunctionTest {
    public
    class FunctionTest {
        public static void main(String[] args) {
            String s = "林青霞,30";
            convert(s, ss -> ss.split(",")[1], Integer::parseInt, i -> i + 70);
        }

        private static void convert(String s, Function<String, String> fun1,
                                    Function<String, Integer> fun2, Function<Integer, Integer> fun3) {
            int i = fun1.andThen(fun2).andThen(fun3).apply(s);
            System.out.println(i);
        }
    }
